package com.group_e.Bubble.client;

import java.io.IOException;
//import java.io.PrintWriter;
//import javax.servlet.http.*;

//import com.google.appengine.api.datastore.Query;
import com.google.appengine.api.rdbms.AppEngineDriver;
import java.sql.*;

public class Connect_D {
	
	private Connection con;

	public Connect_D(String dbname, String username, String password) throws IOException 
	{
		this.con = null;
		try {
		      DriverManager.registerDriver(new AppEngineDriver());
		      con = DriverManager.getConnection("jdbc:google:rdbms://projectof3130:bubble-gtd/"+dbname, username, password);
		    } 
		catch (SQLException e) {
		        e.printStackTrace();
		    }
	}
	
	public Connection getConnect() 
	{
		return con;
	}

}
